<template>
  <div>登录</div>
</template>

<script>
export default {
  data() {
    return {
      appid: "wx1ef8aab656db05b8",
      appsecret: "46a70f317184bf347a8e5a8e375011f8"
    };
  },
  created() {
    this.getCodeApi();
  },
  mounted() {
  },
  methods: {
    // 向微信公众请求code
    getCodeApi() {
      let url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" +
        this.appid +
        "&redirect_uri=" +
        "http://192.168.5.29:5730/m/1001" +
        "&response_type=code&scope=snsapi_userinfo#wechat_redirect";
      window.location.href = url;
    }
  }//methods
};

</script>

<style scoped>

</style>
